package com.jyxd.web.controller.basic;

import com.jyxd.web.data.basic.PagePreserve;
import com.jyxd.web.data.dto.HttpResult;
import com.jyxd.web.service.assessment.basic.PagePreserveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping(value = "/pagePreserve")
@Api(tags = "起始页码保存")
public class PagePreserveController {

    @Autowired
    private PagePreserveService pagePreserveService;

    @ApiOperation("增加或者修改一条起始页码数据")
    @RequestMapping(value = "/insert", method = RequestMethod.POST)
    @ResponseBody
    public HttpResult insert(@RequestBody PagePreserve pagePreserve) {
        return pagePreserveService.insert(pagePreserve);
    }

    @ApiOperation("查询页码数据")
    @RequestMapping(value = "/queryList", method = RequestMethod.POST)
    @ResponseBody
    public HttpResult queryList(@RequestBody Map<String, Object> map) {
        return pagePreserveService.queryList(map);
    }
}
